﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Sketchial.Business;
using Sketchial.Data;

using Helpers;
using System.Text;

namespace Skecthial.UI
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }


        protected void upload_Click(object sender, EventArgs e)
        {
            if (imageFile.HasFile)
            {
                //BlobHelper.UploadImage(
                //  Guid.NewGuid().ToString(),
                //  "1",
                //  "",
                //  "",
                //  imageFile.FileName,
                //  imageFile.PostedFile.ContentType,
                //  imageFile.FileBytes,
                //  "people"
                //);

                string asd=SkecthHelper.GetHumanFace(imageFile.FileBytes, imageFile.FileName);
                BlobHelper.UploadImage(
                  Guid.NewGuid().ToString(),
                  "2",
                  "",
                  "",
                  imageFile.FileName,
                  "svg",
                  Encoding.ASCII.GetBytes(asd),
                  "people"
                );

            }
        }

    }
}